package com.key.w8.http1.factory;

import javax.swing.plaf.PanelUI;

/**
 * @Author: k8
 * @CreateTime: 2025-04-28
 * @Version: 1.0
 */
public enum FileContentType {
    STREAM_CONTENT_TYPE,TEST_CONTENT_TYPE;
    public static final String DEFAULT_BINARY_CONTENT_TYPE = "application/octet-stream";

    /**
     * Default Content-Type in Text form
     */
    public static final String DEFAULT_TEXT_CONTENT_TYPE = "text/plain";
    public static String getType(FileContentType fileContentType){
        assert fileContentType != null;
        switch (fileContentType){
            case TEST_CONTENT_TYPE:
                return DEFAULT_TEXT_CONTENT_TYPE;
            case STREAM_CONTENT_TYPE:
                return DEFAULT_BINARY_CONTENT_TYPE;
        }
        throw new IllegalArgumentException();
    }
}
